﻿CREATE TABLE [dbo].[DBRules] (
    [ID]              UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
    [Tick]            FLOAT            NULL,
    [TickValue]       FLOAT            NULL,
    [MaxNominalOrder] BIGINT           NOT NULL,
    [isBuyAllowed]    BIT              DEFAULT (0x01) NOT NULL,
    [isSellAllowed]   BIT              DEFAULT (0x01) NOT NULL,
    [isShortable]     BIT              DEFAULT (0x01) NOT NULL,
    [isHardToBorrow]  BIT              DEFAULT (0x00) NOT NULL,
    [InstrumentID]    UNIQUEIDENTIFIER NULL,
    PRIMARY KEY CLUSTERED ([ID] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF),
    FOREIGN KEY ([InstrumentID]) REFERENCES [dbo].[DBInstruments] ([ID]) ON DELETE CASCADE ON UPDATE NO ACTION
);

